﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="AdminEditUser.aspx.cs" Inherits="Cotrobaie.AdminEditUser" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" language="javascript">
    firstimeSearchUser = 1;
    function textBoxSearchUser_onFocus(obj) {
        if (firstimeSearchUser)
            obj.value = "";
    }
    function onSearchTextChangedUser(obj) {
        firstimeSearchUser = 0;
    }
    function onSearchFocusOut(obj) {
        if (obj.value == "") {
            firstimeSearchUser = 1;
            obj.value = "Enter username";
            obj.style.color = "#d2d2d2";
        }
    }
</script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<div id="headerMiddle">
	<div id="logo1">
        <asp:ImageButton ID="ImageButton6" runat="server"  ImageUrl="~/images/logomic.png" OnClick="goHome"/>
	</div>			    
</div>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="bigBulina">
        <asp:Image ID="Image1" runat="server" ImageUrl="~/images/biggreeen.png"/>
        <div runat="server" id="contentBigBulina" class="contentBigBulina" style="text-align:left; top:180px; left:150px; color:White; width:600px;">

            <div id="pageTitle" class="pageTitle" runat="server" style="position:relative; left:250px; width:500px">EDIT USERS</div>
            <br />
            <div style="position:relative; left:500px;">
                <asp:LinkButton ID="logout"  runat="server" onclick="logout_Click" CssClass="blgrlink">logout</asp:LinkButton>
            </div>
            <div id="searchUser" >
                <asp:TextBox ID="TextBoxSearchUser" runat="server"  BorderWidth="1"
                    BorderColor="#d2d2d2" BorderStyle="Solid" Text="Enter username" 
                    ForeColor="#d2d2d2" Width="540px" Height="30px" CssClass="search" 
                    AutoComplete="OFF" ></asp:TextBox>
                <ajaxtoolkit:autocompleteextender id="AutoCompleteSearchUser" 
                    EnableCaching="true" CompletionSetCount="6" 
                    runat="server" MinimumPrefixLength="4" 
                    CompletionInterval="10" ServiceMethod="GetAllUsersStrings" ServicePath="WebServicies/Ajax.asmx" 
                    TargetControlID="TextBoxSearchUser" CompletionListCssClass="AutoExtender"
                    CompletionListItemCssClass="AutoExtenderList" CompletionListHighlightedItemCssClass="AutoExtenderHighlight" />
                <span id="searchbut">
                    <asp:ImageButton ID="ImageButton1" runat="server"  
                    ImageUrl="images/search.png"  CssClass="buttonsq" 
                    onclick="ImageButton1_Click" />
                </span>
            </div>
            <br />		
            <br />
            <table runat="server" visible="false" id="tabelUser">
                <tr style="font-weight:bold">
                    <td style="width:150px">
                        Username
                    </td>
                    <td colspan="3">
                        Action
                    </td>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td runat="server" id="Username1"></td>
                    <td style="text-align:right;"><asp:Button ID="Button3" runat="server" Text="View comments" CssClass="bigbutton"  
                        Width="120px" OnClick="showComments"/></td>
                    <td><asp:Button ID="ButtonLog" runat="server" Text="Ban" CssClass="bigbutton"  
                        Width="90px" onclick="ButtonLog_Click"/></td>
                    <td><asp:Button ID="Button2" runat="server" Text="Delete" CssClass="bigbutton"  
                    Width="90px" onclick="Button2_Click"/></td>
                    <td style="width:150px;" colspan="2">&nbsp;</td>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td colspan="4">
                        <div id="AdminComments" runat="server" visible="false">
                
                            <asp:Literal ID="Literal1" runat="server"></asp:Literal>

                            <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>

                            <br /><br />
                            <tabe ID="TabelEditComment" runat="server" visible="false">
                                <tr><td colspan="3" align="left"><hr style="width:450px"/></td></tr>
                                <tr><td style="font-weight:bold;">COMMENT EDIT</td></tr>
                                <tr style="width:500px;">
                                    <td id="EditProductName" runat="server" colspan="3"></td>
                                </tr>
                                <tr>
                                    <td>Title: </td>
                                    <td><asp:TextBox ID="TextBoxEditTitle" runat="server" BorderWidth="1" BorderColor="#d2d2d2" 
                                    BorderStyle="Solid" Height="20" ForeColor="#707070" Width="180px" /></td>
                                    <td id="EditProductDate" runat="server" colspan="3"></td>
                                </tr>
                                <tr>
                                    <td>Comment: </td>
                                    <td><asp:TextBox ID="TextBoxEditComment" runat="server" Rows="4" TextMode="MultiLine"
                                    BorderWidth="1" BorderColor="#d2d2d2" ForeColor="#707070" BorderStyle="Solid" /></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td style="text-align:left;"><asp:Button ID="EditCommentForEver" runat="server" 
                                            Text="Edit" CssClass="bigbutton"  Width="90px" onclick="EditCommentForEver_Click"/></td>
                                </tr>
                            </tabe>
                            <br /><br />
                            <div id="pagesComment" runat="server" class="pagesComment"> 
                                <asp:Button ID="ButtonPrevPage" runat="server" Text="<" CssClass="button2" 
                                     Enabled="false" onclick="ButtonPrevPage_Click" />
                                <asp:Label ID="LabelCurrentPage" runat="server" Text="1"></asp:Label>
                                <asp:Button ID="ButtonNextPage" runat="server" Text=">" CssClass="button2" 
                                    onclick="ButtonNextPage_Click" />
                            </div>
                             <br />
                        </div>
                    </td>   
                </tr>
            </table>
            <br />

        </div></div>
</asp:Content>
